package org.spring;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

public class TestSpring {
	
	public static void main(String[] args) {
		ClassPathResource resource = new ClassPathResource("spring_beans.xml");   
		BeanFactory factory = new XmlBeanFactory(resource);  
		TestClass a = (TestClass)factory.getBean("nameA");
		TestClass b = (TestClass)factory.getBean("nameB");
		TestMap map = (TestMap)factory.getBean("map");
		map.test();
	}

}
